<?php
class linkList {
    function set_page($new_page) {
        $this->pageid = $new_page;
        return $this->pageid;
    }

    function set_id($new_id) {
        $this->id = $new_id;
        return $this->id;
    }

    function get_links() {
        $connect = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME);
        $query = $connect->query("SELECT * FROM ".$prefix."links ORDER BY id");

        while($row = $query->fetch_object()) {

            $this->linklist[] = array(
                "href" => $row->href,
                "summary" => $row->summary,
                "title" => $row->title
            );
        }
        return $this->linklist;
        $query->close();
        $connect->close();
    }
}
?>
